package org.jeecg.modules.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.system.entity.ResultInfo;

import java.util.List;

/**
 * @Description: result_info
 * @Author: jeecg-boot
 * @Date:   2025-04-25
 * @Version: V1.0
 */
@Mapper
public interface ResultInfoMapper extends BaseMapper<ResultInfo> {

    @Select("select b.journal_name,b.batch_name,b.abstracts,a.balancename as subjectname,a.company,a.balance,a.rate,b.source,b.debit,now() as createTime from balance_info a LEFT JOIN detail_info b on a.company = b.detail_name and a.rate = b.rate ")
    List<ResultInfo> selectDebitInfo();

    @Delete("delete from result_info")
    void deleteAll();
}
